Repository navigation
fix(capsule): align Windows translation badge and rail stacking with macOS - #1493
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e6b17c05d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let interactive_height = if picker_visible { | ||
| logical_body_height | ||
| + 24.0 | ||
| + 28.0 | ||
| + if transcript_visible { 52.0 + 8.0 } else { 0.0 } |
There was a problem hiding this comment.
Keep the transcript lane outside the capsule input region
On Windows, recording a translation with the live transcript visible now expands the interactive capsule region across the entire transcript lane: at 1× scale it spans x=100..360 and y=12..156, including the rail at y=48..100. Although the separate rail HWND ignores cursor events, the capsule HWND underneath does not: capsule_hit_test_subclass_proc passes hits inside this rectangle to DefSubclassProc. Consequently, clicking the center of the transcript or the transparent gap below it no longer reaches the application underneath. Use separate badge and body regions, with matching hit testing, rather than making the intervening transcript lane interactive.
Useful? React with 👍 / 👎.
Summary
CapsuleTranslationBadge) always sits at the very top (y = 12..40), above the live transcript rail (y = 48..100) and the capsule pill (y = 124..156).externalBadgeLaneinversion ingetClassicCapsuleGeometryandgetCapsuleTranscriptRailPosition(openless-all/app/src/lib/capsuleLayout.ts).capsule_transcript_rail_positionandcapsule_control_hit_rectinopenless-all/app/src-tauri/src/tauri_coordinator_host.rsin sync so the WindowsSetWindowRgnhit/clip region covers the top translation badge without clipping it.Testing
npm run build(prebuild,tsc,vite build)npx tsx src/lib/capsuleLayout.test.tsnode scripts/windows-ui-config.test.mjsnpx prettier --check src/lib/capsuleLayout.ts src/lib/capsuleLayout.test.ts